<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of ST_erate</title>
  <meta name="keywords" content="ST_erate">
  <meta name="description" content="Calculate erosion rate in kg/(m^2-s)">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt;  <a href="index.html">utilities</a> &gt; ST_erate.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for utilities&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->

<h1>ST_erate
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Calculate erosion rate in kg/(m^2-s)</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [erate] = ST_erate(d,varargin) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Calculate erosion rate in kg/(m^2-s)

 function [erate] = ST_erate(d,varargin)

 DESCRIPTION:
 Calculate erosion rate of sediment diameter d (m) in kg/(m^2-s)
   See NOTE below

 INPUT:
    d: sediment grain size in m
    [optional] 'temperature' = temperature of the seawater in C [default=10]
    [optional] 'salinity'    = salinity of seawater in PSU      [default=35]
    [optional] 'sdens'       = sediment density in kg/m^3       [default=2650]

 OUTPUT:
    erate in kg/(m^2-s)

 EXAMPLE USAGE
    erate = ST_erate(.0005,'temperature',10,'salinity',35,'sdens',2650) 

 Author(s):  
    Geoff Cowles (University of Massachusetts Dartmouth)

 References
    Blaas etal, Cont. Shelf. Res., 27, 2007

 Note
    THIS CALCULATION IS A HACK BASED ON A CURVE FIT OF SEVERAL STUDIES
    Need to modify to use formula of Drake and Cacchione, CSR 9, 1989
    or other.  Someone fix this if possible.

 Revision history
   
==============================================================================</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="ST_wset.html" class="code" title="function [wset] = ST_wset(d,varargin)">ST_wset</a>	Calculate settling velocity of particle diameter d (m) in m/s</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="ST_example.html" class="code" title="function ST_example">ST_example</a>	Example usage of Sediment Toolbox</li><li><a href="ST_summary.html" class="code" title="function [] = ST_summary(d,varargin)">ST_summary</a>	Print summary for stats of particle diameter d (m)</li></ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [erate] = ST_erate(d,varargin)</a>
0002 <span class="comment">% Calculate erosion rate in kg/(m^2-s)</span>
0003 <span class="comment">%</span>
0004 <span class="comment">% function [erate] = ST_erate(d,varargin)</span>
0005 <span class="comment">%</span>
0006 <span class="comment">% DESCRIPTION:</span>
0007 <span class="comment">% Calculate erosion rate of sediment diameter d (m) in kg/(m^2-s)</span>
0008 <span class="comment">%   See NOTE below</span>
0009 <span class="comment">%</span>
0010 <span class="comment">% INPUT:</span>
0011 <span class="comment">%    d: sediment grain size in m</span>
0012 <span class="comment">%    [optional] 'temperature' = temperature of the seawater in C [default=10]</span>
0013 <span class="comment">%    [optional] 'salinity'    = salinity of seawater in PSU      [default=35]</span>
0014 <span class="comment">%    [optional] 'sdens'       = sediment density in kg/m^3       [default=2650]</span>
0015 <span class="comment">%</span>
0016 <span class="comment">% OUTPUT:</span>
0017 <span class="comment">%    erate in kg/(m^2-s)</span>
0018 <span class="comment">%</span>
0019 <span class="comment">% EXAMPLE USAGE</span>
0020 <span class="comment">%    erate = ST_erate(.0005,'temperature',10,'salinity',35,'sdens',2650)</span>
0021 <span class="comment">%</span>
0022 <span class="comment">% Author(s):</span>
0023 <span class="comment">%    Geoff Cowles (University of Massachusetts Dartmouth)</span>
0024 <span class="comment">%</span>
0025 <span class="comment">% References</span>
0026 <span class="comment">%    Blaas etal, Cont. Shelf. Res., 27, 2007</span>
0027 <span class="comment">%</span>
0028 <span class="comment">% Note</span>
0029 <span class="comment">%    THIS CALCULATION IS A HACK BASED ON A CURVE FIT OF SEVERAL STUDIES</span>
0030 <span class="comment">%    Need to modify to use formula of Drake and Cacchione, CSR 9, 1989</span>
0031 <span class="comment">%    or other.  Someone fix this if possible.</span>
0032 <span class="comment">%</span>
0033 <span class="comment">% Revision history</span>
0034 <span class="comment">%</span>
0035 <span class="comment">%==============================================================================</span>
0036 
0037 subname = <span class="string">'ST_erate'</span>;  
0038 <span class="comment">%fprintf('\n')</span>
0039 <span class="comment">%fprintf(['begin : ' subname '\n'])</span>
0040 
0041 <span class="comment">% constants</span>
0042 grav  = 9.8106;   <span class="comment">%g</span>
0043 T     = 10;       <span class="comment">%T (C)</span>
0044 S     = 35;       <span class="comment">%S (PSU)</span>
0045 sdens = 2650;     <span class="comment">%sediment density in kg/m^3</span>
0046 
0047 <span class="comment">% parse arguments</span>
0048 <span class="keyword">for</span> i=1:2:length(varargin)-1
0049         keyword  = lower(varargin{i});
0050         <span class="keyword">if</span>( ~ischar(keyword) )
0051                 error(<span class="string">'incorrect usage of ST_wset'</span>)
0052         <span class="keyword">end</span>;
0053 
0054         <span class="keyword">switch</span>(keyword(1:3))
0055 
0056         <span class="keyword">case</span> <span class="string">'tem'</span>
0057              T = varargin{i+1};
0058         <span class="keyword">case</span> <span class="string">'sal'</span>
0059              S = varargin{i+1};
0060         <span class="keyword">case</span> <span class="string">'sde'</span>
0061              sdens = varargin{i+1}; 
0062         <span class="keyword">otherwise</span>
0063                 error([<span class="string">'Can''t understand value for:'</span> keyword]);
0064         <span class="keyword">end</span>; <span class="comment">%switch keyword</span>
0065 <span class="keyword">end</span>;
0066 
0067 <span class="comment">% calculate settling velocity</span>
0068 wset = <a href="ST_wset.html" class="code" title="function [wset] = ST_wset(d,varargin)">ST_wset</a>(d,<span class="string">'temperature'</span>,T,<span class="string">'salinity'</span>,S,<span class="string">'sdens'</span>,sdens);
0069 
0070 <span class="comment">% calculate erosion rate</span>
0071 erate = 2.666e-4*wset*1000. - 2.51e-9*sdens;
0072 
0073 
0074 
0075 <span class="comment">%fprintf(['end   : ' subname '\n'])</span></pre></div>
<hr><address>Generated on Wed 02-Nov-2011 21:58:00 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>